<template>
  <div class="container">
    <el-radio v-model="check.chkState" :label="1">通过</el-radio>
    <el-radio v-model="check.chkState" :label="2">拒绝</el-radio>

    <div class="content">
      <el-input
        type="textarea"
        :rows="2"
        placeholder="请输入内容"
        v-model="check.chkRemarks"
      >
      </el-input>
    <div class="footer">
      <el-button disabled>取消</el-button>
      <el-button type="primary" @click="btn">确认</el-button>
    </div>
    </div>
  </div>
</template>

<script>
import {choiceCheck} from '@/api/hmmm/questions.js'
export default {
  data() {
    return {
      check:{
           chkState: 1,
           chkRemarks:'',
           id:1
      }

    };
  },
  props: ["row"],
  created(){
      this.check.id=this.row.id
  },
  methods:{
    async btn(){
      if(this.check.chkRemarks.trim()==''){
          this.$message({
            type: 'info',
            message: '请输入内容'
          });
        return
      }
      await choiceCheck(this.check)
      this.$emit('update')
    }
  }
};
</script>

<style scoped lang='less'>
.content{
  margin-top: 10px;
}
.footer{
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: end;
}
</style>
